<template>
  <div id = "app">
    <router-view></router-view>
  </div>
</template>

<script>

export default {
  name: 'app',
  components: {},
  created () {
    this.homeRedirect()
  },
  methods: {
    // app是根组件，所以在进入网页钱进行检查 是否有默认的路径，如果有就跳转到 如果没有就使用默认的 '/home'
    homeRedirect () {
      const path = '/home/' + (window.sessionStorage.getItem('default_active') || '')
      this.$router.push(path)
    }
  }
}
</script>

<style>
</style>
